package com.example.mananger.handler;

import com.example.base.open.OpenUserHandlerService;
import com.example.base.utils.SpringContextUtils;
import org.springframework.web.servlet.HandlerInterceptor;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class OpenInterceptor implements HandlerInterceptor {


    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
        OpenUserHandlerService openUserHandlerService=SpringContextUtils.getBean(OpenUserHandlerService.class);
        return openUserHandlerService.before(request,response,handler);
    }
}
